package cn.chinaiptv.zte.client;

public class CSPRequestProxy implements cn.chinaiptv.zte.client.CSPRequest {
  private String _endpoint = null;
  private cn.chinaiptv.zte.client.CSPRequest cSPRequest = null;
  
  public CSPRequestProxy() {
    _initCSPRequestProxy();
  }
  
  public CSPRequestProxy(String endpoint) {
    _endpoint = endpoint;
    _initCSPRequestProxy();
  }
  
  private void _initCSPRequestProxy() {
    try {
      cSPRequest = (new cn.chinaiptv.zte.client.CSPRequestServiceLocator()).getctms();
      if (cSPRequest != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)cSPRequest)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)cSPRequest)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (cSPRequest != null)
      ((javax.xml.rpc.Stub)cSPRequest)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public cn.chinaiptv.zte.client.CSPRequest getCSPRequest() {
    if (cSPRequest == null)
      _initCSPRequestProxy();
    return cSPRequest;
  }
  
  public cn.chinaiptv.zte.client.CSPResult templateSyncCmdRequest(java.lang.String CSPID, java.lang.String LSPID, java.lang.String correlateID, java.lang.String cmdFileURL) throws java.rmi.RemoteException{
    if (cSPRequest == null)
      _initCSPRequestProxy();
    return cSPRequest.templateSyncCmdRequest(CSPID, LSPID, correlateID, cmdFileURL);
  }
  
  
}